package com.ymatou.iapi.godmch.service;

import java.util.ArrayList;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.ymatou.iapi.godmch.parameter.AgentInfo;
import com.ymatou.iapi.godmch.parameter.AgentTypeVoAndCode;
import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*代理类型详情Call
*FreeMaker Template自动生成代码
*/
public class detailagentTypeCall extends YmatouBaseCall{
	private static String opurl ="api/agentType/detail";
	
	public detailagentTypeCall() {
		super(EnvSetup.getSystemUrl("godmch_iapi"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	public AgentTypeVoAndCode getResult() {
		AgentTypeVoAndCode result =null;
		try {
			result = (AgentTypeVoAndCode) new Gson().fromJson(getJsonObject().get("result").toString(), new TypeToken<AgentTypeVoAndCode>() {}.getType());
		} catch (Exception e) {
//			e.printStackTrace();
		}
		return result;
	}
}